package com.ean.backpack.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ean.backpack.domain.Neighborhoodcoordinateslist;
import com.ean.backpack.repository.NeighborhoodcoordinateslistRepository;
import com.ean.backpack.service.NeighborhoodcoordinateslistService;

@Service
@Transactional
public class NeighborhoodcoordinateslistServiceImpl implements
		NeighborhoodcoordinateslistService {

	@Autowired
	NeighborhoodcoordinateslistRepository neighborhoodcoordinateslistRepository;

	public long countAllNeighborhoodcoordinateslists() {
		return neighborhoodcoordinateslistRepository.count();
	}

	public void deleteNeighborhoodcoordinateslist(
			Neighborhoodcoordinateslist neighborhoodcoordinateslist) {
		neighborhoodcoordinateslistRepository
				.delete(neighborhoodcoordinateslist);
	}

	public Neighborhoodcoordinateslist findNeighborhoodcoordinateslist(
			Integer id) {
		return neighborhoodcoordinateslistRepository.findOne(id);
	}

	public List<Neighborhoodcoordinateslist> findAllNeighborhoodcoordinateslists() {
		return neighborhoodcoordinateslistRepository.findAll();
	}

	public List<Neighborhoodcoordinateslist> findNeighborhoodcoordinateslistEntries(
			int firstResult, int maxResults) {
		return neighborhoodcoordinateslistRepository.findAll(
				new org.springframework.data.domain.PageRequest(firstResult
						/ maxResults, maxResults)).getContent();
	}

	public void saveNeighborhoodcoordinateslist(
			Neighborhoodcoordinateslist neighborhoodcoordinateslist) {
		neighborhoodcoordinateslistRepository.save(neighborhoodcoordinateslist);
	}

	public Neighborhoodcoordinateslist updateNeighborhoodcoordinateslist(
			Neighborhoodcoordinateslist neighborhoodcoordinateslist) {
		return neighborhoodcoordinateslistRepository
				.save(neighborhoodcoordinateslist);
	}
}
